# Maintainer: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
pkgname=hare-madeline
pkgver=0.1_git20240315
_commit=54dcf14b67f34da392be837d01889e2956905d68
pkgrel=0
pkgdesc="tiny readline-alike with some batteries included"
url="https://git.sr.ht/~ecs/madeline"
arch="noarch !armhf !armv7 !ppc64le !s390x !x86 !loongarch64" # blocked by hare
license="WTFPL"
checkdepends="hare"
source="
	$pkgname-$_commit.tar.gz::https://git.sr.ht/~ecs/madeline/archive/$_commit.tar.gz
"
subpackages="$pkgname-doc"
builddir="$srcdir/madeline-$_commit"

check() {
	hare test
}

package() {
	install -dm755 "$pkgdir/usr/src/hare/third-party"
	cp -Rd "graph" "made" "$pkgdir/usr/src/hare/third-party"

	install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "LICENSE"
	install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" "README"
}

sha512sums="
8c20384f93f3ff8ab9e51d1608d85bfc8c123598a88f74d5252af468cb076452f781da0d9f8329b9f3c65cd1edb77c42f3cf8390508731df6e9f7f6e4b204c4a  hare-madeline-54dcf14b67f34da392be837d01889e2956905d68.tar.gz
"
